/** @type {import('vite').UserConfig} */
import { defineConfig, loadEnv } from 'vite';
import baseConfig from './vite.base';
import buildConfig from './vite.build';
const devResolve = {
    serve: (env: any) => Object.assign({}, baseConfig(env)),
    build: (env: any) => Object.assign({}, baseConfig(env), buildConfig(env))
};
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
    const env = loadEnv(mode, process.cwd(), '') || {};
    return devResolve[command](env);
});
